﻿
namespace Pfz.Remoting.Udp
{
	/// <summary>
	/// Interface that must be implemented by custom connection that also offer
	/// asynchronous datagram sends/receives.
	/// </summary>
	public interface IGuaranteedUdpConnection:
		IUdpConnection
	{
		/// <summary>
		/// Checks if a packet was sent as guaranteed or not.
		/// </summary>
		bool IsGuaranteedPacket(byte[] packet);

		/// <summary>
		/// Similar to UdpSend, but the packet is guaranteed to arrive.
		/// The only problem is that it is unordered.
		/// </summary>
		void GuaranteedSend(byte[] buffer, int offset, int count);
	}
}
